package com.example.wangyuyuan.qcodedemo;

import android.app.Application;

import com.netease.scan.QrScan;
import com.netease.scan.QrScanConfiguration;

/**
 * Created by wangyuyuan on 2017/7/25.
 */

public class Myppliction extends Application {

    @Override
    public void onCreate() {
        super.onCreate();


        //        // 默认配置 //
        //   QrScanConfiguration configuration = QrScanConfiguration.createDefault(this);
        // 自定义配置
        QrScanConfiguration configuration = new QrScanConfiguration.Builder(this)
                .setTitleHeight(53)
                .setTitleText("来扫一扫")
                .setTitleTextSize(18)
                .setTitleTextColor(R.color.blue_1)
                .setTipText("将二维码放入框内扫描~")
                .setTipTextSize(14)
                .setTipMarginTop(40)
                .setTipTextColor(R.color.blue_1)
                .setSlideIcon(R.mipmap.ic_launcher)
                .setAngleColor(R.color.blue_1)
                .setMaskColor(R.color.transpsnt)
                .setScanFrameRectRate((float) 0.8)
                .build();
        QrScan.getInstance().init(configuration);
    }
}
